﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Pages_Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        HttpCookie _userInfoCookies = new HttpCookie("UserInfo");
        _userInfoCookies["UserName"] = TextBox1.Text;
        _userInfoCookies["UserColor"] = TextBox2.Text;
        _userInfoCookies.Expires = DateTime.Now.AddMinutes(1);
        _userInfoCookies.Path = "~cookies";
        Response.Cookies.Add(_userInfoCookies);
    }
    
}